x, y = input("请输入鸡兔共几只，几条腿，用空格隔开：").split(" ")
x = int(x)
y = int(y)
a = int(2*x - y/2)
b = int(y/2 - x)
print("鸡{}只，兔{}只".format(a,b))